import React, { useState } from 'react'
import img from '../img/image.png'
import { Button, Modal, Space, Toast, Divider } from 'antd-mobile'
import { useSelector, useDispatch } from 'react-redux'
import  addtoken  from '../store/tokenslice'
function Mymodal({ visible, setVisible }) {
    //  const count = useSelector(state => state.counter.value)
  const dispatch = useDispatch()
    //    封装弹窗
    // let todd=(aa)=>{
    //     alert('登录成功')
    //    dispatch(addtoken(aa))
    // }
    return (
        <div>
            <Modal
                visible={visible}
                content={
                    <div>
                        <img style={{ width: '100%' }} src={img} alt="" />
                        <Button style={{display:'block',width:'100%'}} >登录</Button>
                    </div>
                }

            />
        </div>
    )
}

export default Mymodal
